cssprovider: Explode if we fail to parse the default CSS
authorBenjamin Otte <otte@redhat.com>
Wed, 15 Dec 2010 13:25:19 +0000 (14:25 +0100)
committerBenjamin Otte <otte@redhat.com>
Wed, 15 Dec 2010 13:51:26 +0000 (14:51 +0100)
This can only happen if somebody really messed up with a checkin, and in
that case we want to explode early.

gtk/gtkcssprovider.c

index 4696fcf9acc9e69628fa2261b1c80ef1ac75f5b9..1ea5ed9ae2cc564b4ac923e6e4405170346700a3 100644 (file)
@@ -3824,7 +3824,10 @@ gtk_css_provider_get_default (void)
         "\n";
 
       provider = gtk_css_provider_new ();
-      gtk_css_provider_load_from_data (provider, str, -1, NULL);
+      if (!gtk_css_provider_load_from_data (provider, str, -1, NULL))
+        {
+          g_error ("Failed to load the internal default CSS.");
+        }
     }
 
   return provider;